import Mock from 'mockjs';
// 构造mock数据方式一（推荐使用）
const data = Mock.mock({
  // 属性 list 的值是一个数组，其中含有 1 到 10 个元素
  /*'name|min-max': string 通过重复 string 生成一个字符串，重复次数大于等于 min，小于等于 max。*/
  'foods|10-50': [{
    "id":"@guid",
    //'name': "@ctitle(2,3)",
    'name': "@cname",
    //"img": "@dataimage('120x120','@color','hello')",
    "img": "@image('120x120','@color','hello')",
    "brief": "@csentence(8,50)",
    "price|0-20.0-2": 1,
    "num": 0,
    "minusFlag": true,
    "date": "@datetime",
    "peisongfei|0-100.0-2": 1,
    "limit|0-50": 1
  }],
  "sales|10-50": [{
     "id":"@guid",
    // 属性 id 是一个自增数，起始值为 1，每次增 1
    //'name': "@ctitle(2,10)",
    'name': "@cname",
    "img": "@image('120x120','@color','fuck')",
    "brief": "@csentence(6,50)",
    "price|0-100.0-2": 1,
    "num": 0,
    "minusFlag": true,
    "date": "@datetime",
    "peisongfei|0-100.0-2": 1,
    "limit|0-100": 1
  }]
});

export default  data